package com.metal.gear.certification.entity.vo.permission;

import com.metal.gear.certification.entity.po.SysPermission;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.beans.BeanUtils;

@Data
public class PermissionButtonVo {

    String perms;
    @Schema(name ="权限策略1显示2禁用")
    String permsType;
    @Schema(name ="标题")
    String name;
    @Schema(name ="路径")
    String url;

    public static PermissionButtonVo convertFrom(SysPermission permission){
        PermissionButtonVo vo = new PermissionButtonVo();
        BeanUtils.copyProperties(permission,vo);
        return vo;
    }

}
